/**
 * 
 */
package com.android.contacts.model.vo;

/**
 * @author Amit
 * 
 */
public class Address {
	private String mStreet;
	private String mCity;
	private String mState;
	private String mPostCode;
	private String mCountry;
	private String asString;
	private String mType;
	private String mPostBox;

	/**
	 * @return the mStreet
	 */
	public String getStreet() {
		return mStreet;
	}

	/**
	 * @param street
	 *            the mStreet to set
	 */
	public void setStreet(String street) {
		this.mStreet = street;
	}

	/**
	 * @return the mCity
	 */
	public String getCity() {
		return mCity;
	}

	/**
	 * @param city
	 *            the mCity to set
	 */
	public void setCity(String city) {
		this.mCity = city;
	}

	/**
	 * @return the mState
	 */
	public String getState() {
		return mState;
	}

	/**
	 * @param state
	 *            the mState to set
	 */
	public void setState(String state) {
		this.mState = state;
	}

	/**
	 * @return the mPostCode
	 */
	public String getPostCode() {
		return mPostCode;
	}

	/**
	 * @param postCode
	 *            the mPostCode to set
	 */
	public void setPostCode(String postCode) {
		this.mPostCode = postCode;
	}

	/**
	 * @return the mCountry
	 */
	public String getCountry() {
		return mCountry;
	}

	/**
	 * @param country
	 *            the mCountry to set
	 */
	public void setCountry(String country) {
		this.mCountry = country;
	}

	/**
	 * @return the asString
	 */
	public String getAsString() {
		return asString;
	}

	/**
	 * @param asString
	 *            the asString to set
	 */
	public void setAsString(String asString) {
		this.asString = asString;
	}

	/**
	 * @return the mType
	 */
	public String getType() {
		return mType;
	}

	/**
	 * @param type
	 *            the mType to set
	 */
	public void setType(String type) {
		this.mType = type;
	}

	/**
	 * @return the mPostBox
	 */
	public String getPostBox() {
		return mPostBox;
	}

	/**
	 * @param postBox
	 *            the mPostBox to set
	 */
	public void setPostBox(String postBox) {
		this.mPostBox = postBox;
	}

	public String toString() {
		/*if (this.asString.length() > 0) {
			return (this.asString);
		} else {*/
			String addr = "";
			if (this.getPostBox() != null) {
				addr = addr + this.getPostBox() + "n";
			}
			if (this.getStreet() != null) {
				addr = addr + this.getStreet() + "n";
			}
			if (this.getCity() != null) {
				addr = addr + this.getCity() + ", ";
			}
			if (this.getState() != null) {
				addr = addr + this.getState() + " ";
			}
			if (this.getPostCode() != null) {
				addr = addr + this.getPostCode() + " ";
			}
			if (this.getCountry() != null) {
				addr = addr + this.getCountry();
			}
			return (addr);
		/*}*/
	}

	public Address(String asString, String type) {
		this.asString = asString;
		this.mType = type;
	}

	/**
	 * 
	 */
	public Address(String street, String city, String state, String postCode,
			String country, String postBox, String type) {
		this.mStreet = street;
		this.mCity = city;
		this.mState = state;
		this.mPostCode = postCode;
		this.mCountry = country;
		this.mPostBox = postBox;
		this.mType = type;
	}
}
